using Microsoft.EntityFrameworkCore;
using RBAC.Domain.BomManage;
using RBAC.Domain.DataDashboard;
using RBAC.Domain.Department;
using RBAC.Domain.MaterialManage;
using RBAC.Domain.OutboundManage;
using RBAC.Domain.ProductionPlans;
using RBAC.Domain.PurchasingManagement.PurchaseOrders;
using RBAC.Domain.PurchasingManagement.RawMaterialSupply;
using RBAC.Domain.RBAC;
using RBAC.Domain.SalesManage;
using RBAC.Domain.SalesManage.H;
using RBAC.Domain.StorageManage;
using RBAC.Domain.WarehouseManagement;
using RBAC.Domain.QualityManage;
using RBAC.Domain.ProcessManagement;
using RBAC.Domain.ProcurementManagement;
using RBAC.Domain.Approval;
using RBAC.Domain.ArrivalInspection;
using RBAC.Domain.HXJX;

namespace RBAC.Interstructrue
{
    public class RBACDbContext : DbContext
    {
        public RBACDbContext(DbContextOptions options) : base(options)
        {
        }

        protected RBACDbContext()
        {
        }
        #region  RBAC
        //RBAC
        public DbSet<UserModel> Users { get; set; }
        public DbSet<RoleModel> Roles { get; set; }
        public DbSet<PermissionModel> Permissions { get; set; }
        public DbSet<UserRoleModel> UserRoles { get; set; }
        public DbSet<RolePermissionModel> RolePermissions { get; set; }
        #endregion


        //发货通知单
        /// <summary>
        /// 发货通知单主表
        /// </summary>
        public DbSet<Delivery_notice> Delivery_notices { get; set; }
        /// <summary>
        /// 发货通知单明细表
        /// </summary>
        public DbSet<Delivery_notice_item> delivery_notice_items { get; set; }

        #region  ZZX的表
        /// <summary>
        /// 仓库列表实体
        /// </summary>
        public DbSet<WarehouseList> WarehouseList { get; set; }
        /// <summary>
        /// 采购发票表
        /// </summary>
        public DbSet<PurchaseInvoice> purchaseInvoices { get; set; }
        /// <summary>
        /// 采购发票物料信息表
        /// </summary>
        public DbSet<PurchaseInvoiceMaterials> ProcurementMaterials { get; set; }
        /// <summary>
        /// 采购发票表明细
        /// </summary>
        public DbSet<PurchaseInvoiceDetails> purchaseInvoiceDetails { get; set; }
        /// <summary>
        /// 采购退货单
        /// </summary>
        public DbSet<PurchaseReturn> purchaseReturns { get; set; }
        /// <summary>
        /// 采购退货单物料信息
        /// </summary>
        public DbSet<PurchaseReturnMaterial> purchaseReturnMaterials { get; set; }
        /// <summary>
        /// 采购退货单明细
        /// </summary>
        public DbSet<PurchaseReturnDetails> purchaseReturnDetails { get; set; }
        /// <summary>
        /// 销售退货明细表
        /// </summary>
        public DbSet<SalesReturnDetails> salesReturnDetails { get; set; }

        #endregion


        public DbSet<Mater> Mater { get; set; } //物料
        public DbSet<MaterType> MaterType { get; set; }//物料分类
        public DbSet<SalesOutbound> SalesOutbound { get; set; }//销售出库
        public DbSet<SalesOutboundDetail> SalesOutboundDetail { get; set; }//销售出库明细
        public DbSet<Customer> Customer { get; set; }//客户
        public DbSet<SalesOrder> SalesOrder { get; set; }//销售订单
        public DbSet<SalesOrderDetail> SalesOrderDetail { get; set; }//销售订单明细
        public DbSet<PurchaseStorage> PurchaseStorage { get; set; }//采购入库
        public DbSet<PurchaseStorageDetail> PurchaseStorageDetail { get; set; }//采购入库明细


        //Ll
        /// <summary>
        /// 采购到货单信息
        /// </summary>
        public DbSet<ArrivalOrderInfo> ArrivalOrderInfos { get; set; }
        /// <summary>
        /// 采购到货单物料信息
        /// </summary>
        public DbSet<ArrivalOrderMaterialInfo> ArrivalOrderMaterialInfos { get; set; }
        /// <summary>
        /// 采购订单物料信息
        /// </summary>
        public DbSet<PurchasingMaterialInfo> PurchasingMaterialInfos { get; set; }
        /// <summary>
        /// 采购订单信息
        /// </summary>
        public DbSet<PurchaseOrderInfo> PurchaseOrders { get; set; }
        /// <summary>
        /// 原料供应商
        /// </summary>
        public DbSet<Supplier> Suppliers { get; set; }
        /// <summary>
        /// 供应商开票信息
        /// </summary>
        public DbSet<SupplierInvoice> SupplierInvoices { get; set; }
        /// <summary>
        /// 财务联系人表
        /// </summary>
        public DbSet<SupplierFinance> SupplierFinances { get; set; }
        /// <summary>
        /// 供应商业务联系人表
        /// </summary>
        public DbSet<SupplierBusiness> SupplierBusinesses { get; set; }

        //L2
        /// <summary>
        /// 开票通知单
        /// </summary>
        public DbSet<BillingAccounting> BillingAccountings { get; set; }
        /// <summary>
        /// 开单物料信息
        /// </summary>
        public DbSet<BillingMaterials> BillingMaterials { get; set; }
        /// <summary>
        /// 部门管理类
        /// </summary>
        public DbSet<DepartmentManagement> DepartmentManagements { get; set; }
        /// <summary>
        /// 退货通知单
        /// </summary>
        public DbSet<ReturnNotice> ReturnNotices { get; set; }
        /// <summary>
        /// 退货物料类
        /// </summary>
        public DbSet<ReturnMaterials> ReturnMaterials { get; set; }
        public DbSet<LoggingTable> loggingTables { get; set; }

        /// <summary>
        /// 看板任务类
        /// </summary>
        public DbSet<KanbanTasks> KanbanTasks { get; set; }
        public DbSet<ProductionDashboard> ProductionDashboards { get; set; }

        // Process Management
        /// <summary>
        /// 工序分类
        /// </summary>
        public DbSet<ProcessClassification> ProcessClassifications { get; set; }
        /// <summary>
        /// 工序主表
        /// </summary>
        public DbSet<ProcessInfo> ProcessInfos { get; set; }
        /// <summary>
        /// 工序附件
        /// </summary>
        public DbSet<ProcessAttachment> ProcessAttachments { get; set; }
        /// <summary>
        /// 工艺流程主表
        /// </summary>
        public DbSet<ProcessFlow> ProcessFlows { get; set; }
        /// <summary>
        /// 工艺流程明细
        /// </summary>
        public DbSet<ProcessFlowDetail> ProcessFlowDetails { get; set; }
        /// <summary>
        /// 工艺流程附件
        /// </summary>
        public DbSet<ProcessFlowAttachment> ProcessFlowAttachments { get; set; }
        #region  第二周
        // 甄泽旭
        public DbSet<GoodsInfo> GoodsInfo { get; set; }
        public DbSet<ProductionPlan> ProductionPlan { get; set; }
        public DbSet<SalesTable> SalesTable { get; set; }
        /// <summary>
        /// 采购订单表实体
        /// </summary>
        public DbSet<ProcurementTable> ProcurementTables { get; set; }
        #endregion
        //Bom
        public DbSet<AuditLog> AuditLog { get; set; }
        public DbSet<Bom> Bom { get; set; }
        public DbSet<BomItem> BomItem { get; set; }
        public DbSet<Operation> Operation { get; set; }
        public DbSet<ProcessRoute> ProcessRoute { get; set; }
        public DbSet<Product> Product { get; set; }

        #region 审批流程
        /// <summary>
        /// 审批流程
        /// </summary>
        public DbSet<ApprovalProcess> ApprovalProcess { get; set; }
        /// <summary>
        /// 审批节点
        /// </summary>
        public DbSet<ApprovalNode> ApprovalNode { get; set; }
        /// <summary>
        /// 审批实例
        /// </summary>
        public DbSet<ApprovalInstance> ApprovalInstance { get; set; }
        #endregion


        #region  hxj  生产工单
        /// <summary>
        /// 生产工单
        /// </summary>
        public DbSet<ProductionWorkOrder> ProductionWorkOrder { get; set; }
        /// <summary>
        /// 生产工单附件
        /// </summary>
        public DbSet<ProductionWorkOrderAttachment> ProductionWorkOrderAttachment { get; set; }
        /// <summary>
        /// 生产工单BOM
        /// </summary>
        public DbSet<ProductionWorkOrderBomItem> ProductionWorkOrderBomItem { get; set; }
        /// <summary>
        /// <summary>
        /// 生产工单工序
        /// </summary>
        /// </summary>
        public DbSet<ProductionWorkOrderProcess> ProductionWorkOrderProcess { get; set; }
        #endregion

        #region 质检
        /// <summary>
        /// 质检工单
        /// </summary>
        public DbSet<QualityOrder> QualityOrder { get; set; }
        /// <summary>
        /// 质检工单附件
        /// </summary>
        public DbSet<QualityOrderAttachment> QualityOrderAttachment { get; set; }
        #endregion

        #region  到货
        /// <summary>
        /// 到货检查
        /// </summary>
        public DbSet<ArrivalInspectionAttachment> ArrivalInspectionAttachment { get; set; }
        /// <summary>
        /// 到货检查
        /// </summary>
        public DbSet<ArrivalInspectionInfo> ArrivalInspectionInfo { get; set; }
        /// <summary>
        /// 到货检查
        /// </summary>
        public DbSet<ArrivalInspectionItem> ArrivalInspectionItem { get; set; }
        #endregion
    }
}
